package com.kongyz.filter;

import com.kongyz.Person;

import java.util.ArrayList;
import java.util.List;

/**
 * @author kongyz
 * @date 2018/6/27 21:53
 * @Description: 男性筛选
 */
public class CriteriaMale implements Criteria {
    public List<Person> meetCriteria(List<Person> personList) {
        List<Person> malePersons=new ArrayList<Person>();
        for (Person person:personList){
            if(person.getGender().equalsIgnoreCase("男")){
                malePersons.add(person);
            }
        }
        return malePersons;
    }
}
